Page.TextRect Method (console safe)
Draws a text within given rectangle.

TextRect(
text
as String,
left
as Single,
top
as Single,
right
as Single,
bottom
as Single,
alignment
as Page.TextAlignmentEnum,
ByRef length
as Integer)
Parameters
- text
- The text to draw.
- left
- Left coordinate of the rectangle
- top
- Top coordinate of the rectangle (remember in PDF then y starts from bottom)
- right
- Right coordinate of the rectangle
- bottom
- Bottom coordinate of the rectangle (remember in PDF then y starts from bottom so bottom would be lower number than top)
- alignment
- Alignment of the text within the rectangle. This can be any value of the constants defined in Page.TextAlignmentEnum.
- length (ByRef parameter)
- This ByRef variable will return number of letters drawn in the rectangle.
Remarks
GraphicsMode must be TEXT_OBJECT when calling this method.
Example:
if myFont <> nil then
myPage.BeginText()
myPage.SetFont(myFont,40)
myPage.TextRect("Einhugur PDF export", 10,800, myPage.Width - 10,750, Page.TextAlignmentEnum.CENTER,outLength)
myPage.EndText()
end if
See Also
Page Class